package com.example.demo;

import com.example.demo.listener.event.MyApplicationEnvironmentPreparedEventListener;
import com.example.demo.listener.event.MyApplicationPreparedEventListener;
import com.example.demo.listener.event.MyApplicationStartedEventListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * Created by lisen on 2017/7/4.
 */
@SpringBootApplication
public class EventApplication {
    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(EventApplication.class);
//        app.addListeners(new MyApplicationStartedEventListener());
//        app.addListeners(new MyApplicationEnvironmentPreparedEventListener());
        app.addListeners(new MyApplicationPreparedEventListener());
        app.run(args);
    }
}
